<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Think2do</title>
        
        <!-- basic styles (REQUIRED)-->
        <link href="<?php echo Yii::app()->baseUrl."/assets/css/bootstrap.min.css" ?>" rel="stylesheet" />	
        <link href="<?php echo Yii::app()->baseUrl."/assets/css/font-awesome.min.css" ?>" rel="stylesheet" />
        
        <!-- ace styles (REQUIRED) -->
        <link href="<?php echo Yii::app()->baseUrl."/assets/css/ace.min.css" ?>" rel="stylesheet" />
        <!--elfinder ui (REQUIRED)-->
        <link rel="stylesheet" href="<?php echo Yii::app()->baseUrl."/assets/css/jquery-ui-1.10.3.full.min.css"?>" />
        <link rel="stylesheet" href="<?php echo Yii::app()->baseUrl."/assets/css/ui.jqgrid.css"?>" />
        
        <link rel='stylesheet' href="<?php echo Yii::app()->baseUrl."/assets/main/reset.css?v=635435186962986934" ?>" />
        <link rel='stylesheet' href="<?php echo Yii::app()->baseUrl."/assets/main/main.css?v=635435186962986934"?>" />
        <link rel='stylesheet' href="<?php echo Yii::app()->baseUrl."/assets/main/custome.css?v=635435186962986934"?>" />
        <link rel='stylesheet' href="<?php echo Yii::app()->baseUrl."/assets/main/alotro.css"?>" />
        <link rel='stylesheet' href="<?php echo Yii::app()->baseUrl."/assets/main/alotro.index.css"?>" />
        <!--validator (REQUIRED)-->
        <link rel="stylesheet" href="<?php echo Yii::app()->baseUrl?>/assets/css/bootstrapValidator.min.css"/>
        
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery-1.8.2.min.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.cookie.min.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.validate.min.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.unobtrusive-ajax.min.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.validate.unobtrusive.min.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.autocomplete.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.blockUI.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/json2.js?v=635435186962986934"?>"></script>
        
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/common.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/jquery.countdown.min.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/mypopup.js?v=635435186962986934"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/search.js?v=635435186962986934"?>"></script>
        <!--<script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/event.js?v=635435186962986934"?>"></script>-->
        
        <!--alotro script-->
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/alotro.index.js"?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/main/alotro.layout.js"?>"></script>
        <!--js for validator && elfinder (REQUIRED)-->
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl?>/assets/js/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/assets/js/jquery-1.7.2.min.js"></script> 
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl?>/assets/js/bootstrapValidator.min.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl."/assets/js/bootstrap.min.js" ?>"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/assets/js/jquery-ui-1.10.3.min.js"></script>
        
        <!--elFinder CSS (REQUIRED)--> 
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo Yii::app()->baseUrl ?>/css/elfinder.min.css">
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo Yii::app()->baseUrl ?>/css/theme.css">
        
        <!--elFinder JS (REQUIRED)--> 
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/js/elfinder.min.js"></script>
        
        <!--elFinder translation (OPTIONAL)--> 
       <!--<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/js/i18n/elfinder.ru.js"></script>-->
        
        <!--elFinder initialization (REQUIRED)--> 
        <script type="text/javascript" charset="utf-8">
            $().ready(function() {
            });
        </script>
        <link href="<?php echo Yii::app()->baseUrl."/css/form.css"?>"rel="stylesheet"/>
        <!--my custom-->
        <script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/assets/js/mycustom.js"> </script>
        <link rel="stylesheet" type="text/css" media="screen" href="<?php echo Yii::app()->baseUrl ?>/assets/css/mycustom.css">

    </head>
    <body>
        <!--header-->
        <div class="navbar navbar-fixed-top" role="navigation">
            <div class="container" style="padding: 0 10px">
                <div class="navbar-header">  
                    <a class="navbar-brand" href="#">
                        <img src="<?php echo Yii::app()->baseUrl;?>/assets/images/logo.png" style="height: 20px;" />
                    </a>
                    <a class="navbar-brand">ORDER SYSTEM</a>
                </div>
                <div class="navbar-collapse collapse" data-sb-width="200px" id="navbar-slide" style="">
                    <ul class="nav navbar-nav navbar-right" id="ul-navbar-slide" style="padding-right: 15px">
                        <?php if (isset(Yii::app()->session['login']) && Yii::app()->session['login']) { ?>
                        <li class="list">
                            <a href="javascript: void;"class="dropdown-toggle link acc-info" data-toggle="dropdown" title="<?php echo Yii::app()->session['name']?>">
                                Chào <?php echo Yii::app()->session['name']?>
                                <i class="fa fa-caret-down"></i>
                            </a>
                            <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" role="menu" style="display: none;">
                                <li class="arrow">
                                    <div></div>
                                </li>
                                <li role="presentation">
                                    <a role="menuitem" class="acc-name" tabindex="1" href="#">
                                        <span style="font-weight: bold"><?php echo Yii::app()->session['name']?></span>
                                    </a>
                                </li>
                                <li class="divider" role="presentation"></li>
                                <?php if (empty($row)) {?>
                                <li role="presentation" >
                                    <a role="menuitem" tabindex="2" href="<?php echo Yii::app()->baseUrl;?>/index.php/site/salepointadd">
                                        Tạo Thương Hiệu</a></li>
                        <?php } elseif (Yii::app()->session['saleId'] && $row['sale_active'] != 0) {?>
                                <li role="presentation" >
                                    <a role="menuitem" tabindex="2" href="<?php echo Yii::app()->baseUrl;?>/index.php/site/category">
                                        Quản lý sản phẩm</a></li>
                        <?php }?>
                                <li role="presentation" >
                                    <a role="menuitem" tabindex="3" href="<?php echo Yii::app()->baseUrl;?>/index.php/site/logout">
                                        Đăng xuất</a></li>
                        <script>
                            initPopupMenu('li.list', 'ul.dropdown-menu', 500);
                        </script>
                            </ul>
                        </li>
                        <?php
                             } else {
                        ?>
                        <li><a class="link" href="#" data-toggle="modal" data-target="#registrationModal">Đăng ký</a></li>
                        <li><a class="link" href="#" data-toggle="modal" data-target="#loginModal">Đăng nhập</a></li>
                       <?php }?>
                    </ul>
                </div>
            </div>
        </div>
        <!--menu-->
        <div class="menu-bar" style="margin-top: 51px">
            <div class="container" style="">
                <a class="logo_footer" style=" margin-top: 13px"></a>
                <ul style="float: right; margin: 0px">
                    <?php foreach ($data_business as $key => $value): ?>
                    <li class="inline2">
                        <a href=".?id=<?php echo $key?>" style="padding: 20px 15px; text-decoration: none; color: #ffffff" 
                           onMouseOver="this.style.background='#660000'"
                           onMouseOut="this.style.backgroundColor='#F00';
                           this.style.background='url(../../assets/main/images/index.png) no-repeat scroll right center transparent'"
                           >
                            <?php echo $value['name']?>
                        </a>
                    </li>
                    <?php endforeach;?>
                </ul>
            </div>
        </div>